// components/menu-popup/menu-popup.js
Component({


  properties: {
    show: false,
  },


  data: {

  },
  observers: {

    show(val) {
      console.log('show', val);

    }
  },
  methods: {
    hideMenu() {
      this.triggerEvent('close')
    },

    onMask() {
      this.setData({
        showMenu: false
      })
    },

    handleSelect(e) {
      const index = e.currentTarget.dataset.index
      this.triggerEvent('select', {
        index
      })
      this.hideMenu()
    }
  }
})